<?php
//   if (!isset($_COOKIE['username']) || empty($_COOKIE['username'])) {
//       header('location:/lesson05/login.php');
//   }
    session_start();
    if (!isset($_SESSION['username']) || empty($_SESSION['username'])) {
        header('location:/lesson05/login.php');
    }
?>
<html>
<head>
    <title>用户中心</title>
</head>
<body>
    <div>
        欢迎您,
<!--        --><?php //if (isset($_COOKIE['username'])):?>
<!--            --><?php //echo $_COOKIE['username'];?>
<!--        --><?php //endif;?>
        <?php if (isset($_SESSION['username'])):?>
            <?php echo $_SESSION['username'];?>
        <?php endif;?>
        <a href="/lesson05/doLogout.php">安全退出</a>
    </div>
</body>
</html>